package bookshop.dao;

import java.util.List;

import bookshop.domain.Book;
import bookshop.domain.Category;
import bookshop.service.helper.BookQueryHelper;
import bookshop.service.helper.CategoryQueryHelper;

public interface CategoryDao {
	
	//新增图书类别
	void addCategory(Category ctg);
	
	//显示图书类别
	List<Category> loadall();
	
	//根据所给的图书类别编号查询并返回所有信息
	Category  getCategoryById(int ctgId);
	
	//更新图书类别
	void update(Category ctg);
	
	//删除图书类别
	void delete(int ctgId);

	//根据查询条件查询相应的类别
	List<Category> getCategoryByCondition(CategoryQueryHelper helper);

	//根据条件查询总的图书类别数
	Long countCategoryByConditon(CategoryQueryHelper helper);
	
	//根据pageno和查询条件查询图书类别
	List<Category> getScopedCategorys(CategoryQueryHelper helper,int startIndex,int fetchSize);
}
